<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>请绑定一个账号</title>
<meta name="keywords" content="" />
<link rel="stylesheet" type="text/css" href="/common/images/common.css"/>
<link rel="stylesheet" type="text/css" href="images/css.css"/>
<script src="{cfg:(dirpath,base)}/common.php?app=sys&app_act=web.config&app_ajax=1"></script>
<script src="/common/js/kj.js"></script>
<script src="/common/js/kj.rule.js"></script>
<script src="/common/js/kj.ajax.js"></script>
<style>
.me_main{margin:50px auto 0px auto;width:333px;text-align:center}
.loginbox{float:left;width:333px;border:1px #cccccc solid}
.loginbox .tit{float:left;width:280px;height:36px;background:url(images/bg_1.jpg) no-repeat;text-align:left;font-weight:bold;padding:9px 0px 0px 53px}
.loginbox .logintab{float:left;width:300px;padding:10px 0px 0px 50px}
.loginbox .logintab .tab{float:left}
.loginbox .logintab td{text-align:left;font-size:14px;height:25px;}
</style>
<script>
var thisjs = new function() {
	this.is_verify = {if(cls_obj::get("cls_user")->is_verifycode()==false)}false{else}true{/if};
	this.on_login = function() {
		kj.ajax.post(document.frmlogin , function(data) {
			var obj_data=kj.json(data);
			if(obj_data.isnull) {
				alert("系统繁忙，请稍后再来试试");
			} else {
				if(obj_data.code == 0) {
					window.open("{fun_get::url(array('app_act'=>'bind'))}","_self");
				} else {
					if(thisjs.is_verify) {
						thisjs.verify_refresh();
						document.frmlogin.verifycode.value='';
					}
					if('show_code' in obj_data && obj_data.show_code == '1') {
						thisjs.is_verify = true;
						kj.show("#id_verify_code");
					}
					if('msg' in obj_data && obj_data.msg) {
						alert(obj_data.msg);
					} else {
						alert("系统繁忙，请稍后再来试试");
					}
				}
			}
		});
	}

	this.show_verify = function() {
		var objpic = kj.obj("#id_verify_pic");
		if(objpic.src.indexOf("verifycode")<0) {
			objpic.src = '{cfg:(web_url,base)}/common.php?app=sys&app_act=verifycode';
			kj.handler(document.documentElement,"click",function(e){
				var arr = new Array('img' , 'input');
				var target = kj.event_target(e);
				if(target.name!='verifycode' && target.id!='id_verify_pic') {
					kj.hide('#id_verify');
				}
			});
		}
		kj.show('#id_verify');
	}
	this.verify_refresh = function() {
		kj.obj("#id_verify_pic").src = kj.cfg('baseurl') + '/common.php?app=sys&app_act=verifycode&app_contenttype=img&app_rnd='+Math.random();
	}
}
</script>
<style>
#id_verify{position:absolute;width:130px}
</style>
</head>
<body>
<div class="me_main">
<div class="sp_w1"></div>
<div class="loginbox">
	<div class="tit"><h3>欢迎【{$openinfo['name']}】，登录成功，请绑定一个现有账号</h3></div>
	<div class="logintab">
		<table class="tab">
		<form name="frmlogin" method="post" action="common.php?app=sys&app_act=login.verify" onsubmit="return false;">
		<input type="hidden" name="autologin" value="1">
		<tr><td>{if(cls_config::get('rule_uname','user')=='email')}邮箱：{else if(cls_config::get('rule_uname','user')=='mobile')}手机：{else}用户名：{/if}</td><td><div id="id_verify" style="display:none" onmouseover="kj.show(this);"><img src="" id="id_verify_pic" onclick="this.src='{cfg:(web_url,base)}/common.php?app=sys&app_act=verifycode&app_contenttype=img&app_rnd='+Math.random();"></div><input type="text" name="uname" value="" class="pTxt1 pTxtL200" onfocus="kj.hide('#id_verify');"></td></tr>
		<tr><td>密　码：</td><td><input type="password" name="pwd" class="pTxt1 pTxtL200" onfocus="kj.hide('#id_verify');"></td></tr>
		<tr id="id_verify_code"{if(cls_obj::get("cls_user")->is_verifycode()==false)} style="display:none"{/if}><td>验证码：</td><td><span style="float:left"><input type="text" name="verifycode" class="pTxt1 pTxtL60" onfocus="thisjs.show_verify('#id_verify');"></span></td></tr>
		<tr><td></td><td><input type="submit" name="loginok" value=" 绑定 " class="pSubmit" onclick="thisjs.on_login();">&nbsp;&nbsp;<a href="{fun_get::url(array('app_act'=>'bind.reg'))}">创建新账号</a>&nbsp;&nbsp;<a href="{fun_get::url(array('app_act'=>'bind.auto'))}" style="color:#ff0000">直接进入</a></td></tr>
		<input type="hidden" name="jump_fromurl" value="{$jump_fromurl}" id="id_jump_fromurl">
		</form>
		</table>
	</div>
</div>
</div>
</body>
</html>